# Makefile for ziproxy

# CONFIGURE: If you are using a SystemV-based operating system, such as
# Solaris, you will need to uncomment this definition.
#SYSV_LIBS =	-lnsl -lsocket

#Choose from options below if desirable and put them in EXTRA_CFL
# -DLOGGING -DLOG_PIPE 
# -DLOGGING -DLOG_FILE=\"ziproxy.log\" 
# -DUSE_EXTPROXY -DEXTPROXY_ADDR=\"somewhere.com\" -DEXTPROXY_PORT=8080 
# -DGZIP 

EXTRA_CFL = -I/usr/local/include/libpng12

CFLAGS =-O2 -g -I. -I/usr/local/include $(EXTRA_CFL)

CC = gcc

LDFLAGS = -g $(SYSV_LIBS) -L. -L/usr/local/lib -L/usr/lib/X11 -L/usr/X11R6/liba -lgif -lpng -ljpeg -lm -lz

all: netd ziproxy modifytest

ziproxy: ziproxy.o image.o textmodify.o
	$(CC) $(LDFLAGS) ziproxy.o image.o textmodify.o -o ziproxy

ziproxy.o: ziproxy.c image.h textmodify.h
	$(CC) $(CFLAGS) -c ziproxy.c -o ziproxy.o

image.o: image.c
	$(CC) $(CFLAGS) -c image.c -o image.o

textmodify.o: textmodify.c
	$(CC) $(CFLAGS) -c textmodify.c -o textmodify.o 

netd:netd.c
	$(CC) $(CFLAGS) netd.c -o netd

modifytest: modifytest.c textmodify.o
	$(CC) $(CFLAGS) modifytest.c textmodify.o -o modifytest


#install: all
#	rm -f $(BINDIR)/ziproxy
#	cp ziproxy $(BINDIR)
#	rm -f $(MANDIR)/ziproxy.8
#	cp ziproxy.8 $(MANDIR)

clean:
	rm -f ziproxy netd modifytest *.o core core.* *.core
